<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	  xmlns:ui="http://java.sun.com/jsf/facelets"
	  xmlns:h="http://java.sun.com/jsf/html"
	  xmlns:f="http://java.sun.com/jsf/core">

	<ui:composition template="/WEB-INF/template/default.xhtml">
		<ui:define name="title"><h:outputText value="#{bundle['titulo.paginaInicial']}"/></ui:define>
		
		<ui:define name="content">
	        <h:panelGroup rendered="#{menuMB.usuario==null}">
		        <h:panelGrid columns="2">
		            <h:outputLabel value="#{bundle['label.login']}" for="login"/>
		            <h:inputText id="login" value="#{menuMB.login}" size="40" maxlength="80"/>
		            <h:outputLabel value="#{bundle['label.senha']}" for="senha"/>
		            <h:inputSecret id="senha" value="#{menuMB.senha}" actionListener="#{menuMB.efetuarLogin}" size="40" maxlength="80"/>
		        </h:panelGrid>
		        <h:commandButton actionListener="#{menuMB.efetuarLogin}" value="Login"/>
	        </h:panelGroup>
	        <h:panelGroup columns="2" rendered="#{menuMB.usuario!=null}">
	        	Seja bem vindo #{menuMB.usuario.nome}!
	        </h:panelGroup>
		</ui:define>
	</ui:composition>
</html>
